$('.td-do').on('click','button',(e) =>{
    var el = e.target
    el.parentNode.parentNode.remove()
})
$('.shu').on('click','button',(e) =>{
    var el = e.target,type = el.innerText;
    var s = el.parentNode.querySelector('span')
    var tds = el.parentNode.parentNode.querySelectorAll('button')
    // 单价
    var price = $('.money span')[0].innerText - 0
    // 金额
    var money = $('.jine span')[0]
    var money2 = $('.jine span')[1]
    console.log(price)
    console.log(tds)
    console.log(money)
    console.log(s)
    if (type === '-' && s.innerText > 0){
        // 如果是0就不进行计算
        s.innerText -= 1;
        money.innerText = price*s.innerText
    }else if (type === '+'&& s.innerText < 3){
        s.innerText = s.innerText - 0 + 1;
        money.innerText = price*s.innerText
       
        // money.innerText = price*s.innerText
    }
})